package org.budo.redis.repository;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @author limingwei
 */
public interface BudoRedisRepository {
    Long del(String key);

    Long del(String[] keys);

    Long hdel(String key, String[] fields);

    Long hdel(String key, String field);

    Boolean exists(String key);

    Long expire(String key, Number expireInSeconds);

    Long expireAt(String key, Date expireAt);

    Set<String> keys(String pattern);

    Long decr(String key);

    Long decrBy(String key, Number value);

    String get(String key);

    Integer getInteger(String key);

    String getSet(String key, String value);

    Long incr(String key);

    Long incrBy(String key, Number value);

    Double incrByFloat(String key, Number value);

    List<String> mget(String[] keys);

    String mset(String[] keysValues);

    String mset(Map<String, String> keysValues);

    Long msetnx(String[] keysValues);

    Long msetnx(Map<String, String> keysValues);

    String set(String key, String value);

    String setex(String key, Number seconds, String value);

    String setex(byte[] key, Number seconds, byte[] bytes);

    Long setnx(String key, String value);

    Boolean hexists(String key, String field);

    String hget(String key, String field);

    Map<String, String> hgetAll(String key);

    Long hincrBy(String key, String field, Number value);

    Double hincrByFloat(String key, String field, Number value);

    Set<String> hkeys(String key);

    Long hlen(String key);

    List<String> hmget(String key, String[] fields);

    String hmset(String key, Map<String, String> hash);

    Long hset(String key, String field, String value);

    Long hsetnx(String key, String field, String value);

    List<String> hvals(String key);

    List<String> blpop(Number timeout, String[] keys);

    List<String> brpop(Number timeout, String[] keys);

    String brpoplpush(String source, String destination, Number timeout);

    String lindex(String key, Number index);

    Long linsert(String key, Boolean before, String pivot, String value);

    Long llen(String key);

    String lpop(String key);

    Long lpush(String key, String[] values);

    Long lpushx(String key, String[] values);

    List<String> lrange(String key, Number start, Number end);

    Long lrem(String key, Number count, String value);

    String lset(String key, Number index, String value);

    String ltrim(String key, Number start, Number end);

    String rpop(String key);

    String rpoplpush(String srckey, String dstkey);

    Long rpush(String key, String[] values);

    Long rpushx(String key, String[] values);

    Long sadd(String key, String[] members);

    Long scard(String key);

    Set<String> sdiff(String[] keys);

    Long sdiffstore(String dstkey, String[] keys);

    Set<String> sinter(String[] keys);

    Long sinterstore(String dstkey, String[] keys);

    Boolean sismember(String key, String member);

    Set<String> smembers(String key);

    Long smove(String srckey, String dstkey, String member);

    String spop(String key);

    List<String> srandmember(String key, Number count);

    Long srem(String key, String[] members);

    Set<String> sunion(String[] keys);

    Long sunionstore(String dstkey, String[] keys);

    Long zadd(String key, Number score, String member);

    Long zadd(String key, Map<String, Double> scoreMembers);

    Long zcard(String key);

    Long zcount(String key, Number min, Number max);

    Double zincrby(String key, Number score, String member);

    Set<String> zrange(String key, Number start, Number end);

    Set<String> zrangeByScore(String key, Number min, Number max);

    Long zrank(String key, String member);

    Long zrem(String key, String[] members);

    Long zremrangeByRank(String key, Number start, Number end);

    Long zremrangeByScore(String key, Number start, Number end);

    Set<String> zrevrange(String key, Number start, Number end);

    Set<String> zrevrangeByScore(String key, Number max, Number min);

    Long zrevrank(String key, String member);

    Double zscore(String key, String member);

    Set<String> zrangeByLex(String key, String min, String max);

    Set<String> zrangeByLex(String key, String min, String max, Number offset, Number count);

    Long zlexcount(String key, String min, String max);

    Long zremrangeByLex(String key, String min, String max);

    Object eval(String script);

    Object eval(String script, List<String> keys, List<String> args);

    Object eval(String script, Number keyCount, String[] params);

    String select(Number index);

    String ping();

    String echo(String message);

    String auth(String password);

    List<String> time();

    Long lastsave();

    String info();

    String info(String section);

    Long dbSize();

    List<String> configGet(String pattern);

    String clientSetname(String name);

    String clientList();

    String clientGetname();

    String set(byte[] key, byte[] value);

    byte[] get(byte[] key);
}